package duotai3;

public class AnimalDemo3 {
    public static void main(String[] args) {
        /*创建猫类对象进行测试*/
        Animal3 a=new Cat3();
        a.setName("加肥");
        a.setAge(5);
        System.out.println(a.getName()+","+a.getAge());
        a.eat();
        System.out.println("--------------------------");
        a=new Cat3("加菲",5);
        System.out.println(a.getName()+","+a.getAge());
        a.eat();
    }
}